﻿using System;
using Company.IO.Interfaces;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Company.System.IO.IntegrationTests
{
    public partial class DirectoryTest : TestBase<IDirectory>
    {
        /// <summary>
        ///A test for Constructor
        ///</summary>
        [TestMethod]
        public void Constructor_SystemConverterNotNull_SuccessfullyCreation()
        {
            //Arrange
            ISystemIoConverter systemIoConverter = new SystemIoConverter();

            //Act
            IDirectory target = new Directory(systemIoConverter);

            //Assert
            Assert.IsInstanceOfType(target, typeof (Directory));
        }

        /// <summary>
        ///A test for Directory Constructor
        ///</summary>
        [TestMethod]
        public void Constructor_Default_SuccessfullyCreation()
        {
            //Arrange

            //Act
            IDirectory target = new Directory();

            //Assert
            Assert.IsInstanceOfType(target, typeof (Directory));
        }

        /// <summary>
        ///A test for Directory Constructor
        ///</summary>
        [TestMethod]
        [ExpectedException(typeof (ArgumentNullException))]
        public void Constructor_SystemConverterNull_ArgumentNullException()
        {
            //Arrange
            ISystemIoConverter systemIoConverter = null;

            //Act
            IDirectory target = new Directory(systemIoConverter);

            //Assert
        }
    }
}